#!/usr/bin/env python
#Name: QuizPackBETA (Text Version)
#Version: 0.5
#Created by Alex/The OniOwl Project
#(C) 2007 Alex/The OniOwl Project
#
#Released under the GNU General Public License
#which can be found at: (http://www.gnu.org/copyleft/gpl.html) or the included LICENSE file
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
import quizpacklib
quizpacklib.read_lang('language.ini')
print 'QuizPackBETA by Alex/The OniOwl Project\n'
print 'QuizPackBETA comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute\nit under certain conditions. Visit http://www.gnu.org/copyleft/gpl.html\nor read the LICENSE file included with this program to view the GNU\nGeneral Public License under which this program is released.\n'

quizpacklib.packfile('somequestions.qzp')
print quizpacklib.language.get('text', 'exitphrase')
quizpacklib.change_to_correct_path()
while True:
	quizpacklib.questionnumpick()
	useranswer = raw_input(quizpacklib.questions[quizpacklib.questionnum]+'\n')
	if useranswer in quizpacklib.language.get('text', 'exitcommands'):
		quizpacklib.leave()
	quizpacklib.evalanswer(useranswer)
	quizpacklib.totalans=quizpacklib.totalans+1
	quizpacklib.questionsans.append(quizpacklib.questionnum)
